function [dir_num, file_num] = get_dir_and_file(database_index, images_in_folder)

dir_num=floor(database_index/images_in_folder)+1;
file_num=database_index-((dir_num-1)*images_in_folder);
                
if(file_num == 0)
    file_num = images_in_folder;
    dir_num = dir_num-1;
end